With the development of video coding and decoding techniques, people not only require a higher definition of video images but also have a high requirement on the coding and decoding speeds of the video images. Although the current predominant video coding and decoding protocols can meet the requirements for occasions such as high definition television, video monitoring and video conferencing, it will become increasingly difficult for the original video protocols to meet these requirements of high compression, a high code rate, high fidelity and the like for ultra high-definition video such as 4K×2K and 8K×4K with the continuous development of the video playing industry and the continuous improvement of the user experience. The video compression protocol standard HEVC (the H.265 protocol), as a new generation of video coding and decoding protocol, has the image compression ratio increased by about 50% as compared to the previous generation of the H.264 protocol under the premise of the image quality, and has the image structure greatly changed to enlarge the block size and incorporate parallel processing so as to well meet the requirements for processing the ultra high-definition video images.
In the H.265 protocol, the video is divided into a plurality of slices, each of which generally comprises a plurality of coding tree units (CTUs). Video decoding is to parse each of the coding tree units to obtain image data to be outputted. The concept of wavefront parallel processing (WPP) is proposed in the H.265 protocol, and this method is mainly for parallel processing of the coding tree units in the video slices to increase the image coding and decoding speeds and the image compression ratio.
For one video slice having a plurality of rows and a plurality of columns in the WPP mode, decoding of coding tree units in a next coding tree unit row is started once decoding of two coding tree units in a current coding tree unit row is completed, and so forth. Thus, decoding of the coding tree units of the next row is gradually started so as to achieve parallel coding and decoding processing of the images. For example, as shown in FIG. 1, when a coding tree unit CTU16 in a first row is being decoded, decoding of a coding tree unit CTU24 in a second row, a coding tree unit CTU32 in a third row and a first coding tree unit CTU40 in a fourth row should be started.
The H.265 protocol adopts an arithmetic coding method named Context-based Adaptive Binary Arithmetic Coding (CABAC). During CABAC decoding in the WPP mode, image decoding of each row should be started by obtaining corresponding data such as context variables according to availability of a second coding tree unit in the previous row (except the video slice which has only one coding tree unit in a row) and the fact whether a starting position of the video slice is encountered, i.e., should be reinitialized or directly replicated so that arithmetic decoding contained in the video decoding process can proceed correctly.
The existing video decoding chip generally comprises an embodied program, which includes an entropy decoding unit for carrying out entropy decoding on the video. As shown in FIG. 2, the entropy decoding unit comprises a syntax element status control module 11, a context variable index calculation module 12, an arithmetic decoding module 13 and an inverse binarization module 14. The syntax element status control module 11 gives a syntax element parsing status and transition indication by receiving an external control signal and information fed back from the context variable index calculation module 12, the arithmetic decoding module 13 and the inverse binarization module 14 and carrying out related operations. Under control of the syntax element parsing status control module 11, the context variable index calculation module 12 completes initialization and update of context data and also completes calculation of the syntax element context index in the entropy decoding process. The arithmetic decoding module 13 mainly completes parsing of an original code stream to a syntax element binary code string and transmits the parsing result in the form of a binary value to the inverse binarization module 14. The inverse binarization module 14 receives the binary value given by the arithmetic decoding module 13 and implements the binary to decimal parsing of the syntax element.